1. Field of the Invention
The invention disclosed broadly relates to the field of computer software development and more particularly relates to the field of software toolkits for application development for Java Applications and Java Applets. The invention provides software developers with a consistent Input/Output (I/O) function interface for both Java Applications and Java Applets. This eliminates the problem of developing program logic to execute both as a Java Application and as a Java Applet.
2. Description of the Related Art
Java is a programming language developed by Sun Microsystems. The basic idea behind Java programming is that the same Java software code can run on many different kinds of computers. Stated differently, the goal of Java is to write software once to be run on any Java compliant platform. These different platforms include both different hardware platforms, e.g., RISC, PC, Macintosh, Sparc and different operating system platforms, e.g., Windows 95/NT, Unix, AIX, Copeland. These platforms cover a large class of completely different machines from large servers to thin clients to small portable consumer devices such as personal digital assistants. Software programming tools are available from a variety of suppliers including Sun Microsystems (refer to online URL www.sun.com/java) for developing Java-based software applications or more simply called Java Applications. Software tools for performing I/O (Input/Output) operations for Java Applications are called the Java I/O Toolkit. This Java I/O Toolkit provides software developers with a library of object oriented functions for reading and writing to files that are local to the hardware platform in which the Java Application is executing. Other Java I/O Toolkit functions include performing other I/O function across a network. One example is the reading and writing of files to remote servers.
During the development of Java, the Internet and more particular the World Wide Web ("Web") has become immensely popular largely because of the ease of finding information and the user-friendliness of today's browsers. A feature known as hypertext allows a user to access information from one Web page to another Web page by simply pointing (using a pointing device such as a mouse) at the hypertext and clicking. Another feature that makes the Web attractive is having the ability to process the information (or content) in remote Web pages without the requirement of having a specialized application program for each kind of content accessed. Thus, the same content is viewed across different platforms. Browser technology has evolved to enable running of applications that manipulate this content across a wide variety of different platforms.
In 1995, Sun Microsystems formally introduced HotJava. HotJava is a Web browser that can run Java code. Other Web browsers such as Netscape Navigator and Microsoft Internet Explorer have since added Java capability to their base Web browser products. The combination of Web browser technology combined with Java technology has increased the fundamental of appeal of Java, i.e., the ability to write an application once and run the application across a variety of platforms including Web browsers. And while most of the Java code is portable across platforms including Java compliant Web browsers, some functions such as returning handles to frames or the handling of Input/Output (I/O) are not compatible. Two categories of Java-based programs are necessary. The first category of Java base programs is called a Java Application that runs across computer platforms without being combined with a Web browser. The second category of Java-based programs is called Java Applets that run across systems using Java compliant Web browsers. The reason many functions are not compatible across Java runtime environments of Applets and Applications is due to security concerns. Java Applets are typically loaded by a Web browser being accessed. The Applet by design cannot write or read to local storage devices. This deliberate limitation for I/O is designed to minimize the destructive use of Java Applets as computer viruses that unknowingly make changes to the compute system of the end user. A Java Applet with local write and read access then could easily create havoc by deleting, renaming, scrambling and other wise corrupting a user computer system.
Both of these categories of Java-based programs, Java Application and Java Applets require specialized I/O handling. This specialized I/O is handled by the use of two different Java Classes in the Java I/O toolkit, one class for Java Applets and one class for Java Applications. Because of the requirement of two classes, a developer wishing to create a Java-based software application must treat each run time environment, i.e., Java Applets and Java Applications differently. Because of these different Java I/O toolkit requirements a software developer is forced to develop separate codes to handle each of these two Java I/O classes. Accordingly, there is a need for a method to provide an I/O class interface that can be used both by Java Applications and Java Applets which overcomes the above problems.
Another problem in developing Java-based software applications is the ability to retrieve images. The problem of developing Java-based code specifically for the Java runtime environment as a Java Application or Java Applet for handling images is similar to the problem described above for handling I/O functions. A Java development must create two different sets of code to handle the particular logic and functions for a Java Applet and a Java Application in two separate ways. The requirement of including logic to handle image functions in two distinct ways can produce complex, hard to read and difficult to debug software code. Therefore, a need exists to provide a method to write Java applications that retrieve images when running as both Java Applets and Java Application modes.